package controller.eventListeners;

import java.awt.event.FocusListener;
import java.awt.event.FocusEvent;
import javax.swing.JFormattedTextField;

import controller.CreateRecordController;

public class CreateRecordTextFieldFocusListener implements FocusListener {
	
	@Override
	public void focusGained(FocusEvent e) {

		JFormattedTextField source = (JFormattedTextField)e.getSource();
		source.selectAll();
		
	}

	@Override
	public void focusLost(FocusEvent e) {
		CreateRecordController.getInstance().updateValues();
	}

}
